<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libschc: fragmenter.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libschc
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">fragmenter.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;math.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &quot;<a class="el" href="schc__config_8h_source.html">schc_config.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="compressor_8h_source.html">compressor.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="fragmenter_8h_source.html">fragmenter.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="schc_8h_source.html">schc.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:acc44be1dce0c424c7a0dba4b99049bfc"><td class="memItemLeft" align="right" valign="top">static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#acc44be1dce0c424c7a0dba4b99049bfc">get_fcn_value</a> (uint8_t *fragment, <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:acc44be1dce0c424c7a0dba4b99049bfc"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the FCN value  <a href="fragmenter_8c.html#acc44be1dce0c424c7a0dba4b99049bfc">More...</a><br /></td></tr>
<tr class="separator:acc44be1dce0c424c7a0dba4b99049bfc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbf76eacc23d6ac58b5eaf3908573b87"><td class="memItemLeft" align="right" valign="top">static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#adbf76eacc23d6ac58b5eaf3908573b87">get_max_fcn_value</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:adbf76eacc23d6ac58b5eaf3908573b87"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the ALL-1 FCN value  <a href="fragmenter_8c.html#adbf76eacc23d6ac58b5eaf3908573b87">More...</a><br /></td></tr>
<tr class="separator:adbf76eacc23d6ac58b5eaf3908573b87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8e2fd4f4522dda982abb67868b0e9c0"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#af8e2fd4f4522dda982abb67868b0e9c0">get_padding_length</a> (uint8_t byte)</td></tr>
<tr class="memdesc:af8e2fd4f4522dda982abb67868b0e9c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the number of zero bits added to the end of the buffer  <a href="fragmenter_8c.html#af8e2fd4f4522dda982abb67868b0e9c0">More...</a><br /></td></tr>
<tr class="separator:af8e2fd4f4522dda982abb67868b0e9c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab27292237e7c1e8028caef3fb730d8dc"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ab27292237e7c1e8028caef3fb730d8dc">get_bit_mask</a> (uint8_t len)</td></tr>
<tr class="memdesc:ab27292237e7c1e8028caef3fb730d8dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a bitmap mask for a number of bits  <a href="fragmenter_8c.html#ab27292237e7c1e8028caef3fb730d8dc">More...</a><br /></td></tr>
<tr class="separator:ab27292237e7c1e8028caef3fb730d8dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b3bb52c966b2593d1e9320a568556ac"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a7b3bb52c966b2593d1e9320a568556ac">mbuf_print</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *head)</td></tr>
<tr class="memdesc:a7b3bb52c966b2593d1e9320a568556ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">print the complete mbuf chain  <a href="fragmenter_8c.html#a7b3bb52c966b2593d1e9320a568556ac">More...</a><br /></td></tr>
<tr class="separator:a7b3bb52c966b2593d1e9320a568556ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8617c1460723cbd2d94747a50d3d07a3"><td class="memItemLeft" align="right" valign="top">static int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a8617c1460723cbd2d94747a50d3d07a3">mbuf_push</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **head, uint8_t *data, uint16_t len)</td></tr>
<tr class="memdesc:a8617c1460723cbd2d94747a50d3d07a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an item to the end of the mbuf list if head is NULL, the first item of the list will be set  <a href="fragmenter_8c.html#a8617c1460723cbd2d94747a50d3d07a3">More...</a><br /></td></tr>
<tr class="separator:a8617c1460723cbd2d94747a50d3d07a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a765c256ec42be45fcb0ad08b9b6ac0d9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a765c256ec42be45fcb0ad08b9b6ac0d9">get_prev_mbuf</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *head, <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *mbuf)</td></tr>
<tr class="memdesc:a765c256ec42be45fcb0ad08b9b6ac0d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the last chain in the mbuf linked list  <a href="fragmenter_8c.html#a765c256ec42be45fcb0ad08b9b6ac0d9">More...</a><br /></td></tr>
<tr class="separator:a765c256ec42be45fcb0ad08b9b6ac0d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaa5571b633d41bf356b6b14f4b0f092"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#aaaa5571b633d41bf356b6b14f4b0f092">mbuf_delete</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **head, <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *mbuf)</td></tr>
<tr class="memdesc:aaaa5571b633d41bf356b6b14f4b0f092"><td class="mdescLeft">&#160;</td><td class="mdescRight">delete a mbuf from the chain  <a href="fragmenter_8c.html#aaaa5571b633d41bf356b6b14f4b0f092">More...</a><br /></td></tr>
<tr class="separator:aaaa5571b633d41bf356b6b14f4b0f092"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a778c8f9a787863805816f69781c8ec9c"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a778c8f9a787863805816f69781c8ec9c">mbuf_overwrite</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **head, uint16_t frag, <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *mbuf)</td></tr>
<tr class="memdesc:a778c8f9a787863805816f69781c8ec9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">check if an mbuf with the same fragment number already exists and overwrite if so  <a href="fragmenter_8c.html#a778c8f9a787863805816f69781c8ec9c">More...</a><br /></td></tr>
<tr class="separator:a778c8f9a787863805816f69781c8ec9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a974581b10381381bafe401fc2ddc54c7"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a974581b10381381bafe401fc2ddc54c7">get_mbuf_len</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *head)</td></tr>
<tr class="memdesc:a974581b10381381bafe401fc2ddc54c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the total length of the mbuf  <a href="fragmenter_8c.html#a974581b10381381bafe401fc2ddc54c7">More...</a><br /></td></tr>
<tr class="separator:a974581b10381381bafe401fc2ddc54c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0583aae5db8473647fff91ee0a3e741"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#aa0583aae5db8473647fff91ee0a3e741">get_mbuf_tail</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *head)</td></tr>
<tr class="memdesc:aa0583aae5db8473647fff91ee0a3e741"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the last chain in the mbuf linked list  <a href="fragmenter_8c.html#aa0583aae5db8473647fff91ee0a3e741">More...</a><br /></td></tr>
<tr class="separator:aa0583aae5db8473647fff91ee0a3e741"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b3e7a45b2ff0f407adfcc266f47c3dc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a3b3e7a45b2ff0f407adfcc266f47c3dc">mbuf_copy</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *head, uint8_t *ptr)</td></tr>
<tr class="memdesc:a3b3e7a45b2ff0f407adfcc266f47c3dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">copy the byte alligned contents of the mbuf chain to the passed pointer  <a href="fragmenter_8c.html#a3b3e7a45b2ff0f407adfcc266f47c3dc">More...</a><br /></td></tr>
<tr class="separator:a3b3e7a45b2ff0f407adfcc266f47c3dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a343086d922526b9c211a315f156041e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a343086d922526b9c211a315f156041e6">mbuf_clean</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **head)</td></tr>
<tr class="memdesc:a343086d922526b9c211a315f156041e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">delete all fragments chained in an mbuf  <a href="fragmenter_8c.html#a343086d922526b9c211a315f156041e6">More...</a><br /></td></tr>
<tr class="separator:a343086d922526b9c211a315f156041e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32ae5e155bb05dd96543b5e18ec7e632"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a32ae5e155bb05dd96543b5e18ec7e632">mbuf_sort</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **head)</td></tr>
<tr class="memdesc:a32ae5e155bb05dd96543b5e18ec7e632"><td class="mdescLeft">&#160;</td><td class="mdescRight">sort the complete mbuf chain based on fragment counter (fcn) note: some packets will arrive out of order, as they were part of a retransmission, and consequently arrive out of order, but carry the same fcn  <a href="fragmenter_8c.html#a32ae5e155bb05dd96543b5e18ec7e632">More...</a><br /></td></tr>
<tr class="separator:a32ae5e155bb05dd96543b5e18ec7e632"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a023b34894f235fb324430b3dbda704ff"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a023b34894f235fb324430b3dbda704ff">mbuf_format</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **head, <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a023b34894f235fb324430b3dbda704ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">remove the fragmentation headers and concat the data bits of the complete mbuf chain  <a href="fragmenter_8c.html#a023b34894f235fb324430b3dbda704ff">More...</a><br /></td></tr>
<tr class="separator:a023b34894f235fb324430b3dbda704ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8a2b026fc0d12d1e7d1dcc09a2bb139"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ac8a2b026fc0d12d1e7d1dcc09a2bb139">get_header_length</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *mbuf, <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:ac8a2b026fc0d12d1e7d1dcc09a2bb139"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of bits the current header exists off.  <a href="fragmenter_8c.html#ac8a2b026fc0d12d1e7d1dcc09a2bb139">More...</a><br /></td></tr>
<tr class="separator:ac8a2b026fc0d12d1e7d1dcc09a2bb139"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac86ec2c2210d0627256b9493d38dc79f"><td class="memItemLeft" align="right" valign="top">static unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ac86ec2c2210d0627256b9493d38dc79f">mbuf_compute_mic</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:ac86ec2c2210d0627256b9493d38dc79f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the Message Integrity Check (MIC) over an unformatted mbuf chain containing the compressed, unfragmented packet which is the 8- 16- or 32- bit Cyclic Redundancy Check (CRC)  <a href="fragmenter_8c.html#ac86ec2c2210d0627256b9493d38dc79f">More...</a><br /></td></tr>
<tr class="separator:ac86ec2c2210d0627256b9493d38dc79f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24b1894bc266588db9e6d796ce056259"><td class="memItemLeft" align="right" valign="top">static unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a24b1894bc266588db9e6d796ce056259">compute_mic</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a24b1894bc266588db9e6d796ce056259"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the Message Integrity Check (MIC) which is the 8- 16- or 32- bit Cyclic Redundancy Check (CRC)  <a href="fragmenter_8c.html#a24b1894bc266588db9e6d796ce056259">More...</a><br /></td></tr>
<tr class="separator:a24b1894bc266588db9e6d796ce056259"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaab33166d11e3648fe19a05e95e83808"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#aaab33166d11e3648fe19a05e95e83808">get_window_bit</a> (uint8_t *fragment, <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:aaab33166d11e3648fe19a05e95e83808"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the window bit  <a href="fragmenter_8c.html#aaab33166d11e3648fe19a05e95e83808">More...</a><br /></td></tr>
<tr class="separator:aaab33166d11e3648fe19a05e95e83808"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9125475fce328464d99327eaa258dc51"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a9125475fce328464d99327eaa258dc51">get_received_mic</a> (uint8_t *fragment, uint8_t mic[], <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a9125475fce328464d99327eaa258dc51"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the MIC value  <a href="fragmenter_8c.html#a9125475fce328464d99327eaa258dc51">More...</a><br /></td></tr>
<tr class="separator:a9125475fce328464d99327eaa258dc51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adba6189ec34adbf6118b6446e4cc79f4"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#adba6189ec34adbf6118b6446e4cc79f4">set_conn_frag_cnt</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn, uint8_t frag)</td></tr>
<tr class="memdesc:adba6189ec34adbf6118b6446e4cc79f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the fragmentation counter of the current connection which is the inverse of the fcn value  <a href="fragmenter_8c.html#adba6189ec34adbf6118b6446e4cc79f4">More...</a><br /></td></tr>
<tr class="separator:adba6189ec34adbf6118b6446e4cc79f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a975a839979137aaa1efbd2ddf0064427"><td class="memItemLeft" align="right" valign="top">static int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a975a839979137aaa1efbd2ddf0064427">init_tx_connection</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a975a839979137aaa1efbd2ddf0064427"><td class="mdescLeft">&#160;</td><td class="mdescRight">initializes a new tx transmission for a device: set the starting and ending point of the packet calculate the MIC over the complete SCHC packet  <a href="fragmenter_8c.html#a975a839979137aaa1efbd2ddf0064427">More...</a><br /></td></tr>
<tr class="separator:a975a839979137aaa1efbd2ddf0064427"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af04b125eaaa72e66f782bdb592133a27"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#af04b125eaaa72e66f782bdb592133a27">schc_reset</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:af04b125eaaa72e66f782bdb592133a27"><td class="mdescLeft">&#160;</td><td class="mdescRight">reset a connection  <a href="fragmenter_8c.html#af04b125eaaa72e66f782bdb592133a27">More...</a><br /></td></tr>
<tr class="separator:af04b125eaaa72e66f782bdb592133a27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29b0c22240c3e036882c4667e1816cfc"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a29b0c22240c3e036882c4667e1816cfc">has_no_more_fragments</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a29b0c22240c3e036882c4667e1816cfc"><td class="mdescLeft">&#160;</td><td class="mdescRight">check if a connection has more fragments to deliver  <a href="fragmenter_8c.html#a29b0c22240c3e036882c4667e1816cfc">More...</a><br /></td></tr>
<tr class="separator:a29b0c22240c3e036882c4667e1816cfc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1aa8c251e57be030a00032cece05a42"><td class="memItemLeft" align="right" valign="top">static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ac1aa8c251e57be030a00032cece05a42">set_fragmentation_header</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn, uint8_t *<a class="el" href="fragmenter_8c.html#a65c5dd0dcb4f1b2da783574f4d4441d9">fragmentation_buffer</a>)</td></tr>
<tr class="memdesc:ac1aa8c251e57be030a00032cece05a42"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the fragmentation header  <a href="fragmenter_8c.html#ac1aa8c251e57be030a00032cece05a42">More...</a><br /></td></tr>
<tr class="separator:ac1aa8c251e57be030a00032cece05a42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05f34f0033aac53d005b709cdc351890"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a05f34f0033aac53d005b709cdc351890">set_local_bitmap</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a05f34f0033aac53d005b709cdc351890"><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the local bitmap at the current fragment offset without encoding the bitmap  <a href="fragmenter_8c.html#a05f34f0033aac53d005b709cdc351890">More...</a><br /></td></tr>
<tr class="separator:a05f34f0033aac53d005b709cdc351890"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e7f5b0c689cf574b273258463b3c558"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a2e7f5b0c689cf574b273258463b3c558">clear_bitmap</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a2e7f5b0c689cf574b273258463b3c558"><td class="mdescLeft">&#160;</td><td class="mdescRight">clear the received and local bitmap  <a href="fragmenter_8c.html#a2e7f5b0c689cf574b273258463b3c558">More...</a><br /></td></tr>
<tr class="separator:a2e7f5b0c689cf574b273258463b3c558"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a284ad39e174946d9a7b2e27a4dfb46b6"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a284ad39e174946d9a7b2e27a4dfb46b6">encode_bitmap</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a284ad39e174946d9a7b2e27a4dfb46b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">encode the bitmap by removing all the right most contiguous BYTES in the non-encoded bitmap  <a href="fragmenter_8c.html#a284ad39e174946d9a7b2e27a4dfb46b6">More...</a><br /></td></tr>
<tr class="separator:a284ad39e174946d9a7b2e27a4dfb46b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad72ed26b4fe0b52eebf0278a4d03a3ba"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ad72ed26b4fe0b52eebf0278a4d03a3ba">decode_bitmap</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:ad72ed26b4fe0b52eebf0278a4d03a3ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">reconstruct an encoded bitmap  <a href="fragmenter_8c.html#ad72ed26b4fe0b52eebf0278a4d03a3ba">More...</a><br /></td></tr>
<tr class="separator:ad72ed26b4fe0b52eebf0278a4d03a3ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f427842118f836eff1cc69923570bfe"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a4f427842118f836eff1cc69923570bfe">is_bitmap_full</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn, uint8_t len)</td></tr>
<tr class="memdesc:a4f427842118f836eff1cc69923570bfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">loop over a bitmap to check if all bits are set to 1, starting from MAX_WIND_FCN  <a href="fragmenter_8c.html#a4f427842118f836eff1cc69923570bfe">More...</a><br /></td></tr>
<tr class="separator:a4f427842118f836eff1cc69923570bfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a658f20c04f5ddc967d82cc4666388d1b"><td class="memItemLeft" align="right" valign="top">static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a658f20c04f5ddc967d82cc4666388d1b">get_next_fragment_from_bitmap</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a658f20c04f5ddc967d82cc4666388d1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the next fragment to retransmit according the fragmentation counter  <a href="fragmenter_8c.html#a658f20c04f5ddc967d82cc4666388d1b">More...</a><br /></td></tr>
<tr class="separator:a658f20c04f5ddc967d82cc4666388d1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07a5af086ece498fd748e941e0c78ddf"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a07a5af086ece498fd748e941e0c78ddf">discard_fragment</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a07a5af086ece498fd748e941e0c78ddf"><td class="mdescLeft">&#160;</td><td class="mdescRight">discard a fragment  <a href="fragmenter_8c.html#a07a5af086ece498fd748e941e0c78ddf">More...</a><br /></td></tr>
<tr class="separator:a07a5af086ece498fd748e941e0c78ddf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec2cbdf0a459146a08b0f8b19d0210ed"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#aec2cbdf0a459146a08b0f8b19d0210ed">abort_connection</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:aec2cbdf0a459146a08b0f8b19d0210ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">abort an ongoing transmission because the inactivity timer has expired  <a href="fragmenter_8c.html#aec2cbdf0a459146a08b0f8b19d0210ed">More...</a><br /></td></tr>
<tr class="separator:aec2cbdf0a459146a08b0f8b19d0210ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ef069cec158b7e8615cafdf6bc5960c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a6ef069cec158b7e8615cafdf6bc5960c">set_retrans_timer</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a6ef069cec158b7e8615cafdf6bc5960c"><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the retransmission timer to re-enter the fragmentation loop and changes the retransmission_timer flag  <a href="fragmenter_8c.html#a6ef069cec158b7e8615cafdf6bc5960c">More...</a><br /></td></tr>
<tr class="separator:a6ef069cec158b7e8615cafdf6bc5960c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade85373a86cfb1fafab6d1e11459a336"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ade85373a86cfb1fafab6d1e11459a336">set_dc_timer</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:ade85373a86cfb1fafab6d1e11459a336"><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the duty cycle timer to re-enter the fragmentation loop  <a href="fragmenter_8c.html#ade85373a86cfb1fafab6d1e11459a336">More...</a><br /></td></tr>
<tr class="separator:ade85373a86cfb1fafab6d1e11459a336"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08b8177a4cd6661a8bd59bafa5a631c3"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a08b8177a4cd6661a8bd59bafa5a631c3">set_inactivity_timer</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a08b8177a4cd6661a8bd59bafa5a631c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the inactivity timer to re-enter the fragmentation loop and changes the retransmission_timer flag  <a href="fragmenter_8c.html#a08b8177a4cd6661a8bd59bafa5a631c3">More...</a><br /></td></tr>
<tr class="separator:a08b8177a4cd6661a8bd59bafa5a631c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af63b7724333b0f1c6772c68975397ed2"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#af63b7724333b0f1c6772c68975397ed2">empty_all_0</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *mbuf, <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:af63b7724333b0f1c6772c68975397ed2"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if the fragment inside the mbuf is an all-0 empty  <a href="fragmenter_8c.html#af63b7724333b0f1c6772c68975397ed2">More...</a><br /></td></tr>
<tr class="separator:af63b7724333b0f1c6772c68975397ed2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5739b05b45cf62268f13c661e464c38"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#aa5739b05b45cf62268f13c661e464c38">empty_all_1</a> (<a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *mbuf, <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:aa5739b05b45cf62268f13c661e464c38"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if the fragment inside the mbuf is an all-1 empty  <a href="fragmenter_8c.html#aa5739b05b45cf62268f13c661e464c38">More...</a><br /></td></tr>
<tr class="separator:aa5739b05b45cf62268f13c661e464c38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81394286128d07ef581955cce5df7b38"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a81394286128d07ef581955cce5df7b38">send_fragment</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a81394286128d07ef581955cce5df7b38"><td class="mdescLeft">&#160;</td><td class="mdescRight">composes a packet based on the type of the packet and calls the callback function to transmit the packet  <a href="fragmenter_8c.html#a81394286128d07ef581955cce5df7b38">More...</a><br /></td></tr>
<tr class="separator:a81394286128d07ef581955cce5df7b38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bca46356bc194ce2652cc1e456821cc"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a6bca46356bc194ce2652cc1e456821cc">send_ack</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:a6bca46356bc194ce2652cc1e456821cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">composes an ack based on the parameters found in the connection and calls the callback function to transmit the packet  <a href="fragmenter_8c.html#a6bca46356bc194ce2652cc1e456821cc">More...</a><br /></td></tr>
<tr class="separator:a6bca46356bc194ce2652cc1e456821cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9de30c085b5fb1e62b0f4d9644d71b5"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ab9de30c085b5fb1e62b0f4d9644d71b5">send_empty</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:ab9de30c085b5fb1e62b0f4d9644d71b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">composes an all-empty fragment based on the parameters found in the connection and calls the callback function to transmit the packet  <a href="fragmenter_8c.html#ab9de30c085b5fb1e62b0f4d9644d71b5">More...</a><br /></td></tr>
<tr class="separator:ab9de30c085b5fb1e62b0f4d9644d71b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4ff41290baa28a6f1da923e7e69a71f"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ab4ff41290baa28a6f1da923e7e69a71f">send_tx_empty</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)</td></tr>
<tr class="memdesc:ab4ff41290baa28a6f1da923e7e69a71f"><td class="mdescLeft">&#160;</td><td class="mdescRight">composes an all-empty fragment based on the parameters found in the connection and calls the callback function to transmit the packet  <a href="fragmenter_8c.html#ab4ff41290baa28a6f1da923e7e69a71f">More...</a><br /></td></tr>
<tr class="separator:ab4ff41290baa28a6f1da923e7e69a71f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1b728ad496229979c1eea633a13076d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ab1b728ad496229979c1eea633a13076d">schc_get_connection</a> (uint32_t device_id)</td></tr>
<tr class="memdesc:ab1b728ad496229979c1eea633a13076d"><td class="mdescLeft">&#160;</td><td class="mdescRight">find a connection based on a device id or open a new connection if there was no connection for this device yet  <a href="fragmenter_8c.html#ab1b728ad496229979c1eea633a13076d">More...</a><br /></td></tr>
<tr class="separator:ab1b728ad496229979c1eea633a13076d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d0ef31802d76b26335ec41c86470c04"><td class="memItemLeft" align="right" valign="top">static int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a5d0ef31802d76b26335ec41c86470c04">mic_correct</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *rx_conn)</td></tr>
<tr class="memdesc:a5d0ef31802d76b26335ec41c86470c04"><td class="mdescLeft">&#160;</td><td class="mdescRight">sort the mbuf chain, find the MIC inside the last received fragment and compare with the calculated one  <a href="fragmenter_8c.html#a5d0ef31802d76b26335ec41c86470c04">More...</a><br /></td></tr>
<tr class="separator:a5d0ef31802d76b26335ec41c86470c04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad674ac82b466e641871af9e10d535663"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ad674ac82b466e641871af9e10d535663">wait_end</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *rx_conn, <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *tail)</td></tr>
<tr class="memdesc:ad674ac82b466e641871af9e10d535663"><td class="mdescLeft">&#160;</td><td class="mdescRight">the function to call when the state machine is in WAIT END state  <a href="fragmenter_8c.html#ad674ac82b466e641871af9e10d535663">More...</a><br /></td></tr>
<tr class="separator:ad674ac82b466e641871af9e10d535663"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a248f74b7a8b0ef5f7dbc3f418e05a8"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a6a248f74b7a8b0ef5f7dbc3f418e05a8">schc_reassemble</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *rx_conn)</td></tr>
<tr class="memdesc:a6a248f74b7a8b0ef5f7dbc3f418e05a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">the receiver state machine  <a href="fragmenter_8c.html#a6a248f74b7a8b0ef5f7dbc3f418e05a8">More...</a><br /></td></tr>
<tr class="separator:a6a248f74b7a8b0ef5f7dbc3f418e05a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adaabb8a36ff87d9f89d8215b2773c6c7"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#adaabb8a36ff87d9f89d8215b2773c6c7">schc_fragmenter_init</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *tx_conn, uint8_t(*send)(uint8_t *data, uint16_t length, uint32_t device_id), void(*end_rx)(<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn), void(*remove_timer_entry)(uint32_t device_id))</td></tr>
<tr class="memdesc:adaabb8a36ff87d9f89d8215b2773c6c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the SCHC fragmenter.  <a href="fragmenter_8c.html#adaabb8a36ff87d9f89d8215b2773c6c7">More...</a><br /></td></tr>
<tr class="separator:adaabb8a36ff87d9f89d8215b2773c6c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5e5579cd82363858b434d8e06fd8a73"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#ad5e5579cd82363858b434d8e06fd8a73">tx_fragment_send</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *tx_conn)</td></tr>
<tr class="memdesc:ad5e5579cd82363858b434d8e06fd8a73"><td class="mdescLeft">&#160;</td><td class="mdescRight">the function to call when the state machine is in SEND state  <a href="fragmenter_8c.html#ad5e5579cd82363858b434d8e06fd8a73">More...</a><br /></td></tr>
<tr class="separator:ad5e5579cd82363858b434d8e06fd8a73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80315bb21fe508740e3b5cb066a376a2"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a80315bb21fe508740e3b5cb066a376a2">tx_fragment_resend</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *tx_conn)</td></tr>
<tr class="memdesc:a80315bb21fe508740e3b5cb066a376a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">the function to call when the state machine is in RESEND state  <a href="fragmenter_8c.html#a80315bb21fe508740e3b5cb066a376a2">More...</a><br /></td></tr>
<tr class="separator:a80315bb21fe508740e3b5cb066a376a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a486faa06017a5911c1a4e5ece7a9f69f"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a486faa06017a5911c1a4e5ece7a9f69f">no_missing_fragments_more_to_come</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *tx_conn)</td></tr>
<tr class="memdesc:a486faa06017a5911c1a4e5ece7a9f69f"><td class="mdescLeft">&#160;</td><td class="mdescRight">the function to call when the state machine has to continue transmission  <a href="fragmenter_8c.html#a486faa06017a5911c1a4e5ece7a9f69f">More...</a><br /></td></tr>
<tr class="separator:a486faa06017a5911c1a4e5ece7a9f69f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c375e7b44652a0eccb9248083a6251d"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a5c375e7b44652a0eccb9248083a6251d">schc_fragment</a> (<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *tx_conn)</td></tr>
<tr class="memdesc:a5c375e7b44652a0eccb9248083a6251d"><td class="mdescLeft">&#160;</td><td class="mdescRight">the sender state machine  <a href="fragmenter_8c.html#a5c375e7b44652a0eccb9248083a6251d">More...</a><br /></td></tr>
<tr class="separator:a5c375e7b44652a0eccb9248083a6251d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fac20e73f52464091a717bde243deb3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a0fac20e73f52464091a717bde243deb3">schc_input</a> (uint8_t *data, uint16_t len, <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *tx_conn, uint32_t device_id)</td></tr>
<tr class="memdesc:a0fac20e73f52464091a717bde243deb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function should be called whenever a packet is received.  <a href="fragmenter_8c.html#a0fac20e73f52464091a717bde243deb3">More...</a><br /></td></tr>
<tr class="separator:a0fac20e73f52464091a717bde243deb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb5688d5a6d4d0f4f955951b6ee130b1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#abb5688d5a6d4d0f4f955951b6ee130b1">schc_ack_input</a> (uint8_t *data, uint16_t len, <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *tx_conn, uint32_t device_id)</td></tr>
<tr class="memdesc:abb5688d5a6d4d0f4f955951b6ee130b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function should be called whenever an ack is received.  <a href="fragmenter_8c.html#abb5688d5a6d4d0f4f955951b6ee130b1">More...</a><br /></td></tr>
<tr class="separator:abb5688d5a6d4d0f4f955951b6ee130b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4be088b297563aa42398b23d40868b37"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a4be088b297563aa42398b23d40868b37">schc_fragment_input</a> (uint8_t *data, uint16_t len, uint32_t device_id)</td></tr>
<tr class="memdesc:a4be088b297563aa42398b23d40868b37"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function should be called whenever a fragment is received an open connection is picked for the device out of a pool of connections to keep track of the packet.  <a href="fragmenter_8c.html#a4be088b297563aa42398b23d40868b37">More...</a><br /></td></tr>
<tr class="separator:a4be088b297563aa42398b23d40868b37"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a218091d1b3da710a01587162a5e52b77"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a218091d1b3da710a01587162a5e52b77">ATTEMPTS</a> = 0</td></tr>
<tr class="separator:a218091d1b3da710a01587162a5e52b77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b6637c474f7654e9200070c4ceba1dd"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a4b6637c474f7654e9200070c4ceba1dd">schc_rx_conns</a> [<a class="el" href="schc__config__example_8h.html#ad0b9bf0cc9b61f111c5c12e6d1f931e2">SCHC_CONF_RX_CONNS</a>]</td></tr>
<tr class="separator:a4b6637c474f7654e9200070c4ceba1dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65c5dd0dcb4f1b2da783574f4d4441d9"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a65c5dd0dcb4f1b2da783574f4d4441d9">fragmentation_buffer</a> [<a class="el" href="schc__config__example_8h.html#ae0c8fc6a4adb1c74c7cb4fd33c181af6">MAX_MTU_LENGTH</a>]</td></tr>
<tr class="separator:a65c5dd0dcb4f1b2da783574f4d4441d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59867590ab7459e0b17c2803e50164d4"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a59867590ab7459e0b17c2803e50164d4">MBUF_PTR</a></td></tr>
<tr class="separator:a59867590ab7459e0b17c2803e50164d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4244e4c5e7aac783c02bff28971d3a06"><td class="memItemLeft" align="right" valign="top">static struct <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a4244e4c5e7aac783c02bff28971d3a06">MBUF_POOL</a> [<a class="el" href="schc__config__example_8h.html#abd7889c187270346009f19c2d0453190">SCHC_CONF_MBUF_POOL_LEN</a>]</td></tr>
<tr class="separator:a4244e4c5e7aac783c02bff28971d3a06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a195f3e0501236bd8a5f550d7d45d1c2a"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#a195f3e0501236bd8a5f550d7d45d1c2a">buf_ptr</a> = 0</td></tr>
<tr class="separator:a195f3e0501236bd8a5f550d7d45d1c2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcf22560040f524ffc5dfede8687a670"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fragmenter_8c.html#adcf22560040f524ffc5dfede8687a670">schc_buf</a> [<a class="el" href="schc__config__example_8h.html#a0709fb8e6036919937aef443f7e94c77">SCHC_BUFSIZE</a>] = { 0 }</td></tr>
<tr class="separator:adcf22560040f524ffc5dfede8687a670"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="aec2cbdf0a459146a08b0f8b19d0210ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec2cbdf0a459146a08b0f8b19d0210ed">&#9670;&nbsp;</a></span>abort_connection()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void abort_connection </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>abort an ongoing transmission because the inactivity timer has expired </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2e7f5b0c689cf574b273258463b3c558"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e7f5b0c689cf574b273258463b3c558">&#9670;&nbsp;</a></span>clear_bitmap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void clear_bitmap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>clear the received and local bitmap </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a24b1894bc266588db9e6d796ce056259"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24b1894bc266588db9e6d796ce056259">&#9670;&nbsp;</a></span>compute_mic()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static unsigned int compute_mic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculates the Message Integrity Check (MIC) which is the 8- 16- or 32- bit Cyclic Redundancy Check (CRC) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>pointer to the connection</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>checksum the computed checksum </dd></dl>

</div>
</div>
<a id="ad72ed26b4fe0b52eebf0278a4d03a3ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad72ed26b4fe0b52eebf0278a4d03a3ba">&#9670;&nbsp;</a></span>decode_bitmap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void decode_bitmap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>reconstruct an encoded bitmap </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a07a5af086ece498fd748e941e0c78ddf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07a5af086ece498fd748e941e0c78ddf">&#9670;&nbsp;</a></span>discard_fragment()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void discard_fragment </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>discard a fragment </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af63b7724333b0f1c6772c68975397ed2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af63b7724333b0f1c6772c68975397ed2">&#9670;&nbsp;</a></span>empty_all_0()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t empty_all_0 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>mbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>checks if the fragment inside the mbuf is an all-0 empty </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mbuf</td><td>a pointer to the mbuf</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 this is not an empty all-0 1 this is an empty all-0 </dd></dl>

</div>
</div>
<a id="aa5739b05b45cf62268f13c661e464c38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5739b05b45cf62268f13c661e464c38">&#9670;&nbsp;</a></span>empty_all_1()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t empty_all_1 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>mbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>checks if the fragment inside the mbuf is an all-1 empty </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mbuf</td><td>a pointer to the mbuf</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 this is not an empty all-1 1 this is an empty all-1 </dd></dl>

</div>
</div>
<a id="a284ad39e174946d9a7b2e27a4dfb46b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a284ad39e174946d9a7b2e27a4dfb46b6">&#9670;&nbsp;</a></span>encode_bitmap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void encode_bitmap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>encode the bitmap by removing all the right most contiguous BYTES in the non-encoded bitmap </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab27292237e7c1e8028caef3fb730d8dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab27292237e7c1e8028caef3fb730d8dc">&#9670;&nbsp;</a></span>get_bit_mask()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t get_bit_mask </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>len</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get a bitmap mask for a number of bits </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">len</td><td>the number of bits to set</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>padding the bitmask </dd></dl>

</div>
</div>
<a id="acc44be1dce0c424c7a0dba4b99049bfc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc44be1dce0c424c7a0dba4b99049bfc">&#9670;&nbsp;</a></span>get_fcn_value()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint16_t get_fcn_value </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>fragment</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the FCN value </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fragment</td><td>a pointer to the fragment to retrieve the FCN from</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>FCN the FCN as indicated by the fragment</dd></dl>
<dl class="section note"><dt>Note</dt><dd>only FCN values up to 16 bits are currently supported </dd></dl>

</div>
</div>
<a id="ac8a2b026fc0d12d1e7d1dcc09a2bb139"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8a2b026fc0d12d1e7d1dcc09a2bb139">&#9670;&nbsp;</a></span>get_header_length()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t get_header_length </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>mbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the number of bits the current header exists off. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mbuf</td><td>the mbuf to find th offset for</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>length the length of the header </dd></dl>

</div>
</div>
<a id="adbf76eacc23d6ac58b5eaf3908573b87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbf76eacc23d6ac58b5eaf3908573b87">&#9670;&nbsp;</a></span>get_max_fcn_value()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint16_t get_max_fcn_value </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the ALL-1 FCN value </p>
<dl class="section return"><dt>Returns</dt><dd>FCN the all-1 fcn value</dd></dl>
<dl class="section note"><dt>Note</dt><dd>only FCN values up to 16 bits are currently supported </dd></dl>

</div>
</div>
<a id="a974581b10381381bafe401fc2ddc54c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a974581b10381381bafe401fc2ddc54c7">&#9670;&nbsp;</a></span>get_mbuf_len()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t get_mbuf_len </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>returns the total length of the mbuf </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>len the total length of the fragment </dd></dl>

</div>
</div>
<a id="aa0583aae5db8473647fff91ee0a3e741"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0583aae5db8473647fff91ee0a3e741">&#9670;&nbsp;</a></span>get_mbuf_tail()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a>* get_mbuf_tail </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>returns the last chain in the mbuf linked list </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>tail the last mbuf in the linked list </dd></dl>

</div>
</div>
<a id="a658f20c04f5ddc967d82cc4666388d1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a658f20c04f5ddc967d82cc4666388d1b">&#9670;&nbsp;</a></span>get_next_fragment_from_bitmap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint16_t get_next_fragment_from_bitmap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the next fragment to retransmit according the fragmentation counter </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>frag the next fragment to retransmit 0 no more fragments to retransmit </dd></dl>

</div>
</div>
<a id="af8e2fd4f4522dda982abb67868b0e9c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8e2fd4f4522dda982abb67868b0e9c0">&#9670;&nbsp;</a></span>get_padding_length()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t get_padding_length </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>byte</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the number of zero bits added to the end of the buffer </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">byte</td><td>the byte to investigate</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>padding the length of the padding </dd></dl>

</div>
</div>
<a id="a765c256ec42be45fcb0ad08b9b6ac0d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a765c256ec42be45fcb0ad08b9b6ac0d9">&#9670;&nbsp;</a></span>get_prev_mbuf()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a>* get_prev_mbuf </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>mbuf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>returns the last chain in the mbuf linked list </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list </td></tr>
    <tr><td class="paramname">mbuf</td><td>the mbuf to find the previous mbuf for</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>prev the previous mbuf </dd></dl>

</div>
</div>
<a id="a9125475fce328464d99327eaa258dc51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9125475fce328464d99327eaa258dc51">&#9670;&nbsp;</a></span>get_received_mic()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void get_received_mic </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>fragment</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>mic</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the MIC value </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fragment</td><td>a pointer to the fragment to retrieve the MIC from </td></tr>
    <tr><td class="paramname">mic</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aaab33166d11e3648fe19a05e95e83808"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaab33166d11e3648fe19a05e95e83808">&#9670;&nbsp;</a></span>get_window_bit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t get_window_bit </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>fragment</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the window bit </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fragment</td><td>a pointer to the fragment to retrieve the window number from</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>window the window number as indicated by the fragment </dd></dl>

</div>
</div>
<a id="a29b0c22240c3e036882c4667e1816cfc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29b0c22240c3e036882c4667e1816cfc">&#9670;&nbsp;</a></span>has_no_more_fragments()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t has_no_more_fragments </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>check if a connection has more fragments to deliver </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 the connection still has fragments to send total_bit_offset the total bit offset inside the packet </dd></dl>

</div>
</div>
<a id="a975a839979137aaa1efbd2ddf0064427"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a975a839979137aaa1efbd2ddf0064427">&#9670;&nbsp;</a></span>init_tx_connection()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int8_t init_tx_connection </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>initializes a new tx transmission for a device: set the starting and ending point of the packet calculate the MIC over the complete SCHC packet </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection to initialize</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 on success 0 on error -1 if no fragmentation is needed </dd></dl>

</div>
</div>
<a id="a4f427842118f836eff1cc69923570bfe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f427842118f836eff1cc69923570bfe">&#9670;&nbsp;</a></span>is_bitmap_full()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t is_bitmap_full </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>loop over a bitmap to check if all bits are set to 1, starting from MAX_WIND_FCN </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
    <tr><td class="paramname">len</td><td>the length of the bitmap </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a343086d922526b9c211a315f156041e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a343086d922526b9c211a315f156041e6">&#9670;&nbsp;</a></span>mbuf_clean()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mbuf_clean </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>delete all fragments chained in an mbuf </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac86ec2c2210d0627256b9493d38dc79f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac86ec2c2210d0627256b9493d38dc79f">&#9670;&nbsp;</a></span>mbuf_compute_mic()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static unsigned int mbuf_compute_mic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculates the Message Integrity Check (MIC) over an unformatted mbuf chain containing the compressed, unfragmented packet which is the 8- 16- or 32- bit Cyclic Redundancy Check (CRC) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>checksum the computed checksum </dd></dl>

</div>
</div>
<a id="a3b3e7a45b2ff0f407adfcc266f47c3dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b3e7a45b2ff0f407adfcc266f47c3dc">&#9670;&nbsp;</a></span>mbuf_copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mbuf_copy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>ptr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>copy the byte alligned contents of the mbuf chain to the passed pointer </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list </td></tr>
    <tr><td class="paramname">ptr</td><td>the pointer to copy the contents to </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aaaa5571b633d41bf356b6b14f4b0f092"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaaa5571b633d41bf356b6b14f4b0f092">&#9670;&nbsp;</a></span>mbuf_delete()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void mbuf_delete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>mbuf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>delete a mbuf from the chain </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list </td></tr>
    <tr><td class="paramname">mbuf</td><td>the mbuf to delete </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a023b34894f235fb324430b3dbda704ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a023b34894f235fb324430b3dbda704ff">&#9670;&nbsp;</a></span>mbuf_format()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void mbuf_format </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>remove the fragmentation headers and concat the data bits of the complete mbuf chain </p>
<p>+-&mdash;+---------&mdash;+ +-&mdash;+---------&mdash;+ | FH | DATA | &lt;&mdash; ... &lt;&mdash; | FH | DATA | +-&mdash;+---------&mdash;+ +-&mdash;+---------&mdash;+</p>
<ol type="1">
<li>remove the fragmentation header (FH), but keep the rule id</li>
<li>shift the DATA bits to the left, to overwrite the FH bits 3.</li>
</ol>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>double pointer to the head of the list </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a778c8f9a787863805816f69781c8ec9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a778c8f9a787863805816f69781c8ec9c">&#9670;&nbsp;</a></span>mbuf_overwrite()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t mbuf_overwrite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>frag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>mbuf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>check if an mbuf with the same fragment number already exists and overwrite if so </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list </td></tr>
    <tr><td class="paramname">frag</td><td>the fragment number to overwrite </td></tr>
    <tr><td class="paramname">mbuf</td><td>the fragment to overwrite with</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 no matching fragment found 1 overwrote a matching packet </dd></dl>

</div>
</div>
<a id="a7b3bb52c966b2593d1e9320a568556ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b3bb52c966b2593d1e9320a568556ac">&#9670;&nbsp;</a></span>mbuf_print()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void mbuf_print </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>print the complete mbuf chain </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8617c1460723cbd2d94747a50d3d07a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8617c1460723cbd2d94747a50d3d07a3">&#9670;&nbsp;</a></span>mbuf_push()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int8_t mbuf_push </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>add an item to the end of the mbuf list if head is NULL, the first item of the list will be set </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head of the list </td></tr>
    <tr><td class="paramname">data</td><td>a pointer to the data pointer </td></tr>
    <tr><td class="paramname">len</td><td>the length of the data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-1 no free mbuf slot was found 0 ok </dd></dl>

</div>
</div>
<a id="a32ae5e155bb05dd96543b5e18ec7e632"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32ae5e155bb05dd96543b5e18ec7e632">&#9670;&nbsp;</a></span>mbuf_sort()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void mbuf_sort </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> **&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>sort the complete mbuf chain based on fragment counter (fcn) note: some packets will arrive out of order, as they were part of a retransmission, and consequently arrive out of order, but carry the same fcn </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>double pointer to the head of the list </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5d0ef31802d76b26335ec41c86470c04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d0ef31802d76b26335ec41c86470c04">&#9670;&nbsp;</a></span>mic_correct()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int8_t mic_correct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>rx_conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>sort the mbuf chain, find the MIC inside the last received fragment and compare with the calculated one </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rx_conn</td><td>a pointer to the rx connection structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a486faa06017a5911c1a4e5ece7a9f69f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a486faa06017a5911c1a4e5ece7a9f69f">&#9670;&nbsp;</a></span>no_missing_fragments_more_to_come()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void no_missing_fragments_more_to_come </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>tx_conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>the function to call when the state machine has to continue transmission </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tx_conn</td><td>a pointer to the tx connection structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="abb5688d5a6d4d0f4f955951b6ee130b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb5688d5a6d4d0f4f955951b6ee130b1">&#9670;&nbsp;</a></span>schc_ack_input()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void schc_ack_input </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>tx_conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>device_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function should be called whenever an ack is received. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>a pointer to the received data </td></tr>
    <tr><td class="paramname">len</td><td>the length of the received packet </td></tr>
    <tr><td class="paramname">tx_conn</td><td>a pointer to the tx initialization structure </td></tr>
    <tr><td class="paramname">device_id</td><td>the device id from the rx source </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5c375e7b44652a0eccb9248083a6251d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c375e7b44652a0eccb9248083a6251d">&#9670;&nbsp;</a></span>schc_fragment()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int8_t schc_fragment </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>tx_conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>the sender state machine </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tx_conn</td><td>a pointer to the tx connection structure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 TBD -1 failed to initialize the connection -2 no fragmentation was needed for this packet </dd></dl>

</div>
</div>
<a id="a4be088b297563aa42398b23d40868b37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4be088b297563aa42398b23d40868b37">&#9670;&nbsp;</a></span>schc_fragment_input()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* schc_fragment_input </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>device_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function should be called whenever a fragment is received an open connection is picked for the device out of a pool of connections to keep track of the packet. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>a pointer to the data packet </td></tr>
    <tr><td class="paramname">len</td><td>the length of the received packet </td></tr>
    <tr><td class="paramname">device_id</td><td>the device id from the rx source</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>conn the connection </dd></dl>

</div>
</div>
<a id="adaabb8a36ff87d9f89d8215b2773c6c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adaabb8a36ff87d9f89d8215b2773c6c7">&#9670;&nbsp;</a></span>schc_fragmenter_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int8_t schc_fragmenter_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>tx_conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t(*)(uint8_t *data, uint16_t length, uint32_t device_id)&#160;</td>
          <td class="paramname"><em>send</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(<a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *conn)&#160;</td>
          <td class="paramname"><em>end_rx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(uint32_t device_id)&#160;</td>
          <td class="paramname"><em>remove_timer_entry</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the SCHC fragmenter. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tx_conn</td><td>a pointer to the tx initialization structure </td></tr>
    <tr><td class="paramname">send</td><td>a pointer to the send callback </td></tr>
    <tr><td class="paramname">end_rx</td><td>this function is called to indicate that the last rx timer has expired </td></tr>
    <tr><td class="paramname">remove_timer_entry</td><td>some scheduler implementations need a callback to remove a timer entry for a certain device</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>error codes on error </dd></dl>

</div>
</div>
<a id="ab1b728ad496229979c1eea633a13076d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1b728ad496229979c1eea633a13076d">&#9670;&nbsp;</a></span>schc_get_connection()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* schc_get_connection </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>device_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>find a connection based on a device id or open a new connection if there was no connection for this device yet </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device_id</td><td>the id of the device to open a connection for</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>conn a pointer to the selected connection 0 if no free connections are available </dd></dl>

</div>
</div>
<a id="a0fac20e73f52464091a717bde243deb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0fac20e73f52464091a717bde243deb3">&#9670;&nbsp;</a></span>schc_input()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a>* schc_input </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>tx_conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>device_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function should be called whenever a packet is received. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>a pointer to the received data </td></tr>
    <tr><td class="paramname">len</td><td>the length of the received packet </td></tr>
    <tr><td class="paramname">tx_conn</td><td>a pointer to the tx initialization structure </td></tr>
    <tr><td class="paramname">device_id</td><td>the device id from the rx source </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6a248f74b7a8b0ef5f7dbc3f418e05a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a248f74b7a8b0ef5f7dbc3f418e05a8">&#9670;&nbsp;</a></span>schc_reassemble()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int8_t schc_reassemble </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>rx_conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>the receiver state machine </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 TBD </dd></dl>

</div>
</div>
<a id="af04b125eaaa72e66f782bdb592133a27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af04b125eaaa72e66f782bdb592133a27">&#9670;&nbsp;</a></span>schc_reset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void schc_reset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>reset a connection </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection to reset </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6bca46356bc194ce2652cc1e456821cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bca46356bc194ce2652cc1e456821cc">&#9670;&nbsp;</a></span>send_ack()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t send_ack </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>composes an ack based on the parameters found in the connection and calls the callback function to transmit the packet </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection</td></tr>
  </table>
  </dd>
</dl>
<p>@ret 0 the packet was not sent 1 the packet was transmitted </p>

</div>
</div>
<a id="ab9de30c085b5fb1e62b0f4d9644d71b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9de30c085b5fb1e62b0f4d9644d71b5">&#9670;&nbsp;</a></span>send_empty()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t send_empty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>composes an all-empty fragment based on the parameters found in the connection and calls the callback function to transmit the packet </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection</td></tr>
  </table>
  </dd>
</dl>
<p>@ret 0 the packet was not sent 1 the packet was transmitted </p>

</div>
</div>
<a id="a81394286128d07ef581955cce5df7b38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81394286128d07ef581955cce5df7b38">&#9670;&nbsp;</a></span>send_fragment()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t send_fragment </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>composes a packet based on the type of the packet and calls the callback function to transmit the packet </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection</td></tr>
  </table>
  </dd>
</dl>
<p>@ret 0 the packet was not sent 1 the packet was transmitted </p>

</div>
</div>
<a id="ab4ff41290baa28a6f1da923e7e69a71f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4ff41290baa28a6f1da923e7e69a71f">&#9670;&nbsp;</a></span>send_tx_empty()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t send_tx_empty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>composes an all-empty fragment based on the parameters found in the connection and calls the callback function to transmit the packet </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection</td></tr>
  </table>
  </dd>
</dl>
<p>@ret 0 the packet was not sent 1 the packet was transmitted </p>

</div>
</div>
<a id="adba6189ec34adbf6118b6446e4cc79f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adba6189ec34adbf6118b6446e4cc79f4">&#9670;&nbsp;</a></span>set_conn_frag_cnt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void set_conn_frag_cnt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>frag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the fragmentation counter of the current connection which is the inverse of the fcn value </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
    <tr><td class="paramname">frag</td><td>the fcn value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ade85373a86cfb1fafab6d1e11459a336"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade85373a86cfb1fafab6d1e11459a336">&#9670;&nbsp;</a></span>set_dc_timer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void set_dc_timer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>sets the duty cycle timer to re-enter the fragmentation loop </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac1aa8c251e57be030a00032cece05a42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1aa8c251e57be030a00032cece05a42">&#9670;&nbsp;</a></span>set_fragmentation_header()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint16_t set_fragmentation_header </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>fragmentation_buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the fragmentation header </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
    <tr><td class="paramname">buffer</td><td>a pointer to the buffer to set the header</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bit_offset the number of bits added to the front of the fragment </dd></dl>

</div>
</div>
<a id="a08b8177a4cd6661a8bd59bafa5a631c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08b8177a4cd6661a8bd59bafa5a631c3">&#9670;&nbsp;</a></span>set_inactivity_timer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void set_inactivity_timer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>sets the inactivity timer to re-enter the fragmentation loop and changes the retransmission_timer flag </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a05f34f0033aac53d005b709cdc351890"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05f34f0033aac53d005b709cdc351890">&#9670;&nbsp;</a></span>set_local_bitmap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void set_local_bitmap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>sets the local bitmap at the current fragment offset without encoding the bitmap </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6ef069cec158b7e8615cafdf6bc5960c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ef069cec158b7e8615cafdf6bc5960c">&#9670;&nbsp;</a></span>set_retrans_timer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void set_retrans_timer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>sets the retransmission timer to re-enter the fragmentation loop and changes the retransmission_timer flag </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>a pointer to the connection </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a80315bb21fe508740e3b5cb066a376a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80315bb21fe508740e3b5cb066a376a2">&#9670;&nbsp;</a></span>tx_fragment_resend()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void tx_fragment_resend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>tx_conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>the function to call when the state machine is in RESEND state </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tx_conn</td><td>a pointer to the tx connection structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad5e5579cd82363858b434d8e06fd8a73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5e5579cd82363858b434d8e06fd8a73">&#9670;&nbsp;</a></span>tx_fragment_send()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void tx_fragment_send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>tx_conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>the function to call when the state machine is in SEND state </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tx_conn</td><td>a pointer to the tx connection structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad674ac82b466e641871af9e10d535663"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad674ac82b466e641871af9e10d535663">&#9670;&nbsp;</a></span>wait_end()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t wait_end </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> *&#160;</td>
          <td class="paramname"><em>rx_conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> *&#160;</td>
          <td class="paramname"><em>tail</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>the function to call when the state machine is in WAIT END state </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rx_conn</td><td>a pointer to the rx connection structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a218091d1b3da710a01587162a5e52b77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a218091d1b3da710a01587162a5e52b77">&#9670;&nbsp;</a></span>ATTEMPTS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ATTEMPTS = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a195f3e0501236bd8a5f550d7d45d1c2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a195f3e0501236bd8a5f550d7d45d1c2a">&#9670;&nbsp;</a></span>buf_ptr</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t buf_ptr = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a65c5dd0dcb4f1b2da783574f4d4441d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65c5dd0dcb4f1b2da783574f4d4441d9">&#9670;&nbsp;</a></span>fragmentation_buffer</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t fragmentation_buffer[<a class="el" href="schc__config__example_8h.html#ae0c8fc6a4adb1c74c7cb4fd33c181af6">MAX_MTU_LENGTH</a>]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a4244e4c5e7aac783c02bff28971d3a06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4244e4c5e7aac783c02bff28971d3a06">&#9670;&nbsp;</a></span>MBUF_POOL</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structschc__mbuf__t.html">schc_mbuf_t</a> MBUF_POOL[<a class="el" href="schc__config__example_8h.html#abd7889c187270346009f19c2d0453190">SCHC_CONF_MBUF_POOL_LEN</a>]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a59867590ab7459e0b17c2803e50164d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59867590ab7459e0b17c2803e50164d4">&#9670;&nbsp;</a></span>MBUF_PTR</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t MBUF_PTR</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="adcf22560040f524ffc5dfede8687a670"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcf22560040f524ffc5dfede8687a670">&#9670;&nbsp;</a></span>schc_buf</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t schc_buf[<a class="el" href="schc__config__example_8h.html#a0709fb8e6036919937aef443f7e94c77">SCHC_BUFSIZE</a>] = { 0 }</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a4b6637c474f7654e9200070c4ceba1dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b6637c474f7654e9200070c4ceba1dd">&#9670;&nbsp;</a></span>schc_rx_conns</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structschc__fragmentation__t.html">schc_fragmentation_t</a> schc_rx_conns[<a class="el" href="schc__config__example_8h.html#ad0b9bf0cc9b61f111c5c12e6d1f931e2">SCHC_CONF_RX_CONNS</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
